//
// CppUnitException.h
//


#ifndef CppUnit_CppUnitException_INCLUDED
#define CppUnit_CppUnitException_INCLUDED

#include <exception>
#include <string>

namespace JHCPP{
	namespace CppUnit{
		class CCppUnitException : public std::exception
		{
		public:
			CCppUnitException(const std::string& message = "", 
							 long lineNumber = CPPUNIT_UNKNOWNLINENUMBER, 
							 const std::string& fileName = CPPUNIT_UNKNOWNFILENAME);
			CCppUnitException(const std::string& message,
							 long lineNumber,
							 long data1lineNumber,
							 const std::string& fileName);
			CCppUnitException(const std::string& message,
							 long lineNumber,
							 long data1lineNumber,
							 long data2lineNumber,
							 const std::string& fileName);
			CCppUnitException(const CCppUnitException& other);
			virtual ~CCppUnitException() throw();

			CCppUnitException& operator = (const CCppUnitException& other);

			const char* what() const throw ();

			long lineNumber() const;
			long data1LineNumber() const;
			long data2LineNumber() const;
			const std::string& fileName() const;

			static const std::string CPPUNIT_UNKNOWNFILENAME;
			static const int CPPUNIT_UNKNOWNLINENUMBER;

		private:
			long        m_lineNumber;
			long        m_data1lineNumber;
			long        m_data2lineNumber;
			std::string m_message;
			std::string m_fileName;
		};
	}//end of namespace CppUnit
}//end of namespace JHCPP

#endif // CppUnit_CppUnitException_INCLUDED
